MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately
authorAleksandar Markovic <aleksandar.markovic@imgtec.com>
Mon, 19 Jun 2017 15:50:12 +0000 (17:50 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 01:09:19 +0000 (01:09 +0000)
commitf30cc67f3c4019640d7624c179b70b75b2bf64bd
tree415d3fddb9b3c800693d4aa858c89d1edb6c1994
parentb9f4e2e9628fea913d076f9470c274e743b5f9ca
MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately

commit ddbfff7429a75d954bf5bdff9f2222bceb4c236a upstream.

If accumulator value is zero, just return the value of previously
calculated product. This brings logic in MADDF/MSUBF implementation
closer to the logic in ADD/SUB case.

Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Cc: James.Hogan@imgtec.com
Cc: Paul.Burton@imgtec.com
Cc: Raghu.Gandham@imgtec.com
Cc: Leonid.Yegoshin@imgtec.com
Cc: Douglas.Leung@imgtec.com
Cc: Petar.Jovanovic@imgtec.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16512/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/math-emu/dp_maddf.c
arch/mips/math-emu/sp_maddf.c